# coding: utf-8
from . import db, BaseModel


class VerifyMail(db.Model):
    __tablename__ = 'verify_mail'

    auto_id = db.Column(db.Integer, primary_key=True, info='自增主键')
    mail_verify_id = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, info='邮件验证码ID')
    mail_verify_code = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), nullable=False, info='邮件验证码')
    mail = db.Column(db.String(255, 'utf8mb4_0900_ai_ci'), info='用户邮箱')
    is_deleted = db.Column(db.Integer, server_default=db.FetchedValue(), info='验证码是否有效（默认0）：0--是；1--否')
    create_time = db.Column(db.DateTime, server_default=db.FetchedValue(), info='创建时间')
